package main

import "fmt"
import "github.com/jaypipes/ghw"

func main() {
	block, err := ghw.Block()
	if err != nil {
		fmt.Printf("Error getting block storage info: %v", err)
	}

	fmt.Printf("--%v\n", block)

	for _, disk := range block.Disks {
		fmt.Printf(" Disk=%v name=%v,drive_type=%v,buspath=%v:",
			disk, disk.Name, disk.DriveType, disk.BusPath)
		for _, part := range disk.Partitions {
			fmt.Printf("  %v", part)
		}
		fmt.Printf("\n")
	}
}
